package com.carol.lmsbe.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * 设备更新请求DTO
 */
@Data
public class EquipmentUpdateRequest {

    @NotNull(message = "设备ID不能为空")
    private Long id;

    @NotBlank(message = "设备类别不能为空")
    private String category;

    @NotBlank(message = "设备名称不能为空")
    private String name;

    @NotBlank(message = "设备编号不能为空")
    private String code;

    private String serialNumber;

    private String specification;

    @NotNull(message = "单价不能为空")
    @Positive(message = "单价必须大于0")
    private BigDecimal unitPrice;

    @NotNull(message = "数量不能为空")
    @Positive(message = "数量必须大于0")
    private Integer quantity;

    @NotNull(message = "购置日期不能为空")
    private LocalDate purchaseDate;

    private String manufacturer;

    private Integer warrantyPeriod;

    private String handlerName;

    @NotNull(message = "实验室ID不能为空")
    private Long laboratoryId;

    private String status;

    private String remark;
}
